package com.jingdianjichi.auth.common.enums;

import lombok.Getter;

/**
 * 删除状态枚举
 */
@Getter
public enum IsOpenFlagEnum {
    OPEN(0, "启用"),
    CLOSE(1, "禁用");

    private int code;
    private String desc;

    IsOpenFlagEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public static IsOpenFlagEnum getDeletedEnumCode(int code) {
        for (IsOpenFlagEnum flagEnum : IsOpenFlagEnum.values()) {
            if (flagEnum.code == code) {
                return flagEnum;
            }

        }
        return null;
    }
}
